{extend name="template/pc/kalawan/_base.html" /}
{block name="css"}
<link rel="stylesheet" type="text/css" href="__TPMPLATE__pc/kalawan/css/Validform_msg.css"/>
{/block}
{block name="main"}

<div class="container content cont-pc">

    {include file="template/pc/kalawan/_left.html"}

    <div class="cont-right">

        {include file="template/pc/kalawan/_right.html"}

        <div class="cont-details">

            <div class="table-responsive">

                <form name="" method="post" action="{:url('massage/save')}" id="formPC">
                    <table class="table table-bordered table-message">
                        <thead>
                            <tr style="background: #ddd;">
                                <th colspan="2" >提交留言</th>
                            </tr>
                        </thead>

                        <tbody>
                            <tr>
                                <td><label class="form-label "><span class="c-red">*</span>标题</label></td>
                                <td><input type="text" id="form-title" name="title" value="" datatype="*" class="form-control"></td>
                            </tr>
                            <tr>
                                <td><label class="form-label "><span class="c-red">*</span>称呼</label></td>
                                <td><input type="text" id="form-name" name="name" value="" datatype="*" class="form-control"></td>
                            </tr>
                            <tr>
                                <td><label class="form-label ">电话</label></td>
                                <td><input type="number" id="form-tel" name="tel" value="" class="form-control"></td>
                            </tr>
                            <tr>
                                <td><label class="form-label ">Email</label></td>
                                <td><input type="email" id="form-mail" name="mail" value="" class="form-control"></td>
                            </tr>
                            <tr>
                                <td><label class="form-label ">其他联系方式</label></td>
                                <td><input type="text" id="form-address" name="other" value="" class="form-control" placeholder="如QQ, MSN等"></td>
                            </tr>
                            <tr>
                                <td><label class="form-label "><span class="c-red">*</span>内容</label></td>
                                <td>
                                    <textarea name="center" cols="58" rows="7" tabindex="4" class="sm-form-control" datatype="*" style="border: 1px solid #cccccc;border-radius: 3px !important;"></textarea>
                                </td>
                            </tr>
                            <tr>
                                <td><label class="form-label "><span class="c-red">*</span>验证码</label></td>
                                <td>
                                    <input type="text" name="captcha" value="" datatype="*" class="form-control code-form-control">
                                    <img class="code-form-img" id="captcha" src='{:captcha_src()}' onclick='this.src = "{:captcha_src()}"' alt='验证码' title='看不清验证码，点击刷新!'/>
                                </td>
                            </tr>
                        </tbody>

                        <tfoot>
                            <tr>
                                <th style="border-right: 0px;"></th>
                                <th style="border-left: 0px;">
                                    <input class="table-btn table-sub" type="submit" value="提交留言"/>
                                    <input class="table-btn tab-res" type="reset" value="&nbsp;重&nbsp;&nbsp;&nbsp;&nbsp;置&nbsp;">
                                </th>
                            </tr>
                        </tfoot>
                    </table>
                </form>

            </div>

        </div>

    </div>

</div>

<div class="cont-mobile">

    <div class="container">

        {include file="template/pc/kalawan/_right.html"}

        {include file="template/pc/kalawan/_left.html"}

        <div class="contact">

            <div class="table-responsive">

                <form name="" id="formMobile" method="post" action="{:url('massage/save')}">

                    <table class="table table-bordered table-message">
                        <thead>
                            <tr>
                                <th colspan="2">在线留言</th>
                            </tr>
                        </thead>

                        <tbody>
                            <tr>
                                <td><span class="c-red">*</span>标题</td>
                                <td><input type="text" name="title" value="" datatype="*" class="form-control"></td>
                            </tr>

                            <tr>
                                <td><span class="c-red">*</span>称呼</td>
                                <td><input type="text" name="name" value="" datatype="*" class="form-control"></td>
                            </tr>

                            <tr>
                                <td><span class="c-red">*</span>电话</td>
                                <td><input type="number" name="tel" value="" datatype="*" class="form-control"></td>
                            </tr>

                            <tr>
                                <td>Email</td>
                                <td><input type="email" name="mail" value="" class="form-control"></td>
                            </tr>

                            <tr>
                                <td>联系方式</td>
                                <td><input type="text" name="QQ" value="" class="form-control" placeholder="如QQ, MSN等"></td>
                            </tr>

                            <tr>
                                <td><span class="c-red">*</span>内容</td>
                                <td>
                                    <textarea name="center" rows="7" tabindex="4" datatype="*" class="sm-form-control"></textarea>
                                </td>
                            </tr>
                        </tbody>

                        <tfoot>
                            <tr>
                                <th style="border-right: 0px;"></th>
                                <th style="border-left: 0px;">
                                    <input class="btn btn-success radius size-L" type="submit" value="提交留言"/>
                                </th>
                            </tr>
                        </tfoot>
                    </table>

                </form>

            </div>

        </div>

    </div>

</div>

{/block}

{block name="js"}
<!--验证-->
<script type="text/javascript" src="__STATIC__/admin/hui/lib/Validform/v5.3.2/Validform_v5.3.2_min.js"></script>

<script type="text/javascript">
    $("#formPC").Validform({
        tiptype: 3,
        label: ".form-label",
        ajaxPost: true,
        showAllError: true,
        callback: function (data) {
            if (data.status == "y") {
                setTimeout(function () {
                    window.location.reload();
                }, 1000);
            } else {
                setTimeout(function () {
                    $.Hidemsg(); //公用方法关闭信息提示框;显示方法是$.Showmsg("message goes here.");
                }, 1000);
                $("#captcha").click();
                $("[name='captcha']").val('');
            }

        }
    });

    $("#formMobile").Validform({
        tiptype: 3,
        label: ".form-label",
        ajaxPost: true,
        showAllError: true,
        callback: function (data) {
            if (data.status == "y") {
                setTimeout(function () {
                    window.location.reload();
                }, 1000);
            } else {
                setTimeout(function () {
                    $.Hidemsg(); //公用方法关闭信息提示框;显示方法是$.Showmsg("message goes here.");
                }, 1000);
                $("#captcha").click();
                $("[name='captcha']").val('');
            }

        }
    });
</script>
{/block}